﻿using System.Windows;

namespace 代理模式
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    /// 可以对对象的访问进行控制
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            var schoolGril = new SchoolGril {Name = "丽丽"};
            var proxy=new Proxy(schoolGril);
            proxy.GaveChocolate();
            proxy.GaveDolls();
            proxy.GaveFlowers();
        }
    }
}
